package com.ruoyi.applet.appletRegion.service.impl;

import com.ruoyi.applet.appletRegion.domain.AppletRegion;
import com.ruoyi.applet.appletRegion.mapper.AppletRegionMapper;
import com.ruoyi.applet.appletRegion.service.IAppletRegionService;
import com.ruoyi.common.core.text.Convert;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * 小程序地区Service业务层处理
 * @author ruoyi
 * @date 2024-12-17
 */
@Service
public class AppletRegionServiceImpl implements IAppletRegionService {
    
    @Resource
    private AppletRegionMapper appletRegionMapper;
    
    /**
     * 查询小程序地区
     * @param id 小程序地区主键
     * @return 小程序地区
     */
    @Override
    public AppletRegion selectAppletRegionById(Long id) {
        return appletRegionMapper.selectAppletRegionById(id);
    }
    
    /**
     * 查询小程序地区列表
     * @param appletRegion 小程序地区
     * @return 小程序地区
     */
    @Override
    public List<AppletRegion> selectAppletRegionList(AppletRegion appletRegion) {
        return appletRegionMapper.selectAppletRegionList(appletRegion);
    }
    
    /**
     * 新增小程序地区
     * @param appletRegion 小程序地区
     * @return 结果
     */
    @Override
    public int insertAppletRegion(AppletRegion appletRegion) {
        return appletRegionMapper.insertAppletRegion(appletRegion);
    }
    
    /**
     * 修改小程序地区
     * @param appletRegion 小程序地区
     * @return 结果
     */
    @Override
    public int updateAppletRegion(AppletRegion appletRegion) {
        return appletRegionMapper.updateAppletRegion(appletRegion);
    }
    
    /**
     * 批量删除小程序地区
     * @param ids 需要删除的小程序地区主键
     * @return 结果
     */
    @Override
    public int deleteAppletRegionByIds(String ids) {
        return appletRegionMapper.deleteAppletRegionByIds(Convert.toStrArray(ids));
    }
    
    /**
     * 删除小程序地区信息
     * @param id 小程序地区主键
     * @return 结果
     */
    @Override
    public int deleteAppletRegionById(Long id) {
        return appletRegionMapper.deleteAppletRegionById(id);
    }
}
